1. Field of the Invention
The present invention relates generally to congestion control during data transfer and, more particularly, to systems and methods for determining the amount of bandwidth used by a queue.
2. Description of Related Art
Conventional network devices, such as routers, relay streams of data through a network from a source to a destination. Typically, the network devices include one or more memory subsystems to temporarily buffer data while the network devices perform network-related functions, such as route processing or accounting.
A data stream may be considered a pipe of data packets belonging to a communication between a particular source and one or more particular destinations. A network device may assign a variable number of queues (e.g., where a queue may be considered a logical first-in, first-out (FIFO) buffer) to a data stream. For a stream with n queues, the relationship of queues and streams may be represented by:
      stream    bandwidth    =            ∑      0              n        -        1              ⁢                  ⁢                  queue        bandwidth            .      In other words, the queues belonging to a stream share the entire bandwidth of the stream. Each of the queues may be allocated a portion of the stream's bandwidth.
It is sometimes necessary to determine how much of the bandwidth allocated to a queue is actually used by the queue, such as for congestion control purposes. A conventional technique to determine bandwidth use involves determining the amount of data enqueued at any given time. A problem with this technique, however, is that such determinations are often inefficient.
As a result, there is a need for systems and methods for efficiently determining bandwidth use by queues in a network device.